% This file prepares the data for Figure 4
cd ../m_files
set_parameters(2.48,0,1.51,-0.52,0.8,15,1,0,8);

cd ../mod_files
dynare a15_markups_cbase.mod
corr_w_inertia=zeros(1,17);
for i=-8:1:8
    corr_w_inertia(i+9)=corr(mu(9+i:9992+i),y(9:9992));
end

cd ../mat_files
save('fig9_model_cbase.mat','corr_w_inertia');

cd ../m_files
set_parameters(0,0,1.51,-0.52,0.8,15,1,0,8);

cd ../mod_files
dynare a15_markups_cbase.mod
corr_wo_inertia=zeros(1,17);
for i=-8:1:8
    corr_wo_inertia(i+9)=corr(mu(9+i:9992+i),y(9:9992));
end

cd ../mat_files
save('fig9_model_cbase.mat','corr_wo_inertia','-append');
cd ../m_files